<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>   
    <script>
        // 后台往前台传数据，字符串，true，unll，undefined 都变成 ''
        // 出来了一种语法，json和对象类似，里面不许有函数
        // undefined无法转化
        let ss = '{"name":1111,"is":true,"mynum":"张三","myn":null}'
        let jj = JSON.parse(ss)
        console.log(jj);
        let obj = {
            name:"李四",
            age:10,
            is:true,
            myn:null
        }
        let arr = [10,"张三",true]
        let aa = JSON.stringify(arr)
        console.log(aa);
        console.log(typeof aa);
        console.log(JSON.parse(aa));
        console.log(JSON.parse("true"));
        

    </script>
</body>
</html>